// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
thread 'HELID' 


:HELID_36C
wait 6 
if 
   Player.Defined($PLAYER_CHAR)
jf @HELID_36C 
Model.Load(#MAVERICK)
Model.Load(#FAM1)
038B: load_requested_models 

:HELID_38B
wait 6 
if or
   not Model.Available(#MAVERICK)
   not Model.Available(#FAM1)
jf @HELID_3C7 
0ACD: show_text_highpriority "~R~~H~FATAL ERROR TERMINATE" time 19000 
end_thread 

:HELID_3C7
if and
   Model.Available(#MAVERICK)
   Model.Available(#FAM1)
jf @HELID_3E2 
jump @HELID_3E9 

:HELID_3E2
jump @HELID_38B 

:HELID_3E9
wait 0 
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0 
04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset -100.0 -100.0 0.0 
0208: 17@ = random_float_in_ranges 11@ 14@ 
0208: 18@ = random_float_in_ranges 12@ 15@ 
0087: 19@ = 13@ // (float) 
if 
00C2:   sphere_onscreen 17@ 18@ 19@ radius 5.0 
jf @HELID_46B 
wait 0 
jump @HELID_3E9 

:HELID_46B
21@ = Car.Create(#MAVERICK, 17@, 18@, 19@)
Actor.StorePos($PLAYER_ACTOR, 11@, 12@, 13@)
Car.SetImmunities(21@, 1, 1, 1, 1, 1)
039F: set_car 21@ race_to 11@ 12@ 
0825: set_helicopter 21@ instant_rotor_start 
20@ = Actor.CreateAsDriver(Gang2, #FAM1, 21@)
Actor.RemoveFromMissionCleanupList(20@)
Actor.Health(20@) = 100000
Actor.SetImmunities(20@, 1, 1, 1, 1, 1)
0430: put_actor $PLAYER_ACTOR into_car 21@ passenger_seat 0 
wait 1000 
Camera.Restore_WithJumpCut

:HELID_4E4
wait 6 
if 
0AB6: store_target_marker_coords_to 1@ 2@ 3@ // IF and SET 
jf @HELID_591 
if 
   Actor.InCar($PLAYER_ACTOR, 21@)
jf @HELID_591 
if 
   not Car.Wrecked(21@)
jf @HELID_591 
04DF: set_heli 21@ lean_and_thrust_limiter 0 
0564: heli 21@ simulate_crash_landing 
07BB: set_heli 21@ horizontal_thrust_power 10 
Car.SetMaxSpeed(21@, 70.0)
07BB: set_heli 21@ horizontal_thrust_power 6 
04A2: set_heli 21@ fly_to 1@ 2@ 3@ altitude_between 70.0 and 70.0 
0ACD: show_text_highpriority "~Y~~H~REMEMBER FIRST SET MARKER ON MAP TO FLY" time 9000 

:HELID_591
wait 6 
if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 1@ 2@ radius 25.0 25.0 in_car 
jf @HELID_612 
0ACD: show_text_highpriority "~Y~~H~TO SEE THE FOLLOWING CJ" time 9000 
0407: store_coords_to 22@ 23@ 24@ from_car 21@ with_offset -1.0 -3.0 0.0 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 22@ 23@ 24@ 
Car.RemoveReferences(21@)
Actor.RemoveReferences(20@)
end_thread 

:HELID_612
if 
00E1:   player 0 pressed_key 16 
jf @HELID_657 
if 
   not Car.Wrecked(21@)
jf @HELID_657 
02E3: 25@ = car 21@ speed 
25@ *= 1.2 
25@ += 1.1 
Car.SetSpeedInstantly(21@, 25@)

:HELID_657
if 
   not Actor.InCar($PLAYER_ACTOR, 21@)
jf @HELID_69A 
0ACD: show_text_highpriority "~Y~~H~TO SEE THE FOLLOWING CJ" time 9000 
Car.RemoveReferences(21@)
Actor.RemoveReferences(20@)
end_thread 

:HELID_69A
wait 50 
jf @HELID_4E4 
jump @HELID_4E4 
end_thread